public class Solution717 {
    public boolean isOneBitCharacter(int[] bits) {
        for (int i=0;i<bits.length;i++){
            if (i==bits.length-1){
                return true;
            }
            if (bits[i]==1){
                i++;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        System.out.println(new Solution717().isOneBitCharacter(new int[]{1,1,1,0}));
    }
}
